

public class Sort {
    public static void insertSort(int[] array) {
        int i =1;
        int tmp = 0;
        for (; i < array.length; i++) {
            tmp = array[i];
            int j = i-1;
            for (; j>=0; j--){
                if (array[j] > tmp){
                    array[j+1] = array[j];

                }else {
                    break;
                }
            }
            array[j+1] = tmp;
        }
    }
}